package com.peak.distribution.vo.order;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.peak.distribution.enums.Constants;
import com.peak.distribution.enums.OrderStatus;
import com.peak.distribution.enums.OrderType;
import com.peak.distribution.enums.PayChannel;
import com.peak.spring.boot.api.web.IdVo;
import com.peak.spring.boot.core.mapper.Format;
import com.peak.spring.boot.core.mapper.Format.TransferFormat;
import com.peak.spring.boot.core.mapper.Transfer;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class DisOrderVo extends IdVo {

	private static final long serialVersionUID = Constants.DISTRIBUTION_VERSION;
	
	/** 订单号 */
	private String orderNo;

	/** 订单类型 */
	@Format(format = TransferFormat.ENUM)
	private OrderType orderType;

	/** 订单时间 */
	@Format(format = TransferFormat.DATE)
	private Date orderTime;

	/** 支付渠道 */
	@Format(format = TransferFormat.ENUM)
	private PayChannel payChannel;

	/** 订单状态 */
	@Format(format = TransferFormat.ENUM)
	private OrderStatus status;

	/** 商品总金额 */
	@Format(format = TransferFormat.MONEY_CENT)
	private Integer goodsFee;
	
	/** 物流费用 */
	@Format(format = TransferFormat.MONEY_CENT)
	private Integer shoppingFee;
	
	/** 订单总费用 */
	@Format(format = TransferFormat.MONEY_CENT)
	private Integer orderFee;

	/** 商品总重量 */
	private Double goodsWeight;

	/** 订单备注 */
	private String remark;
	
	/** 买家 */
	@Transfer(mapping = "agent.id")
	private Integer agentId;
	
	/** 买家姓名 */
	@Transfer(mapping = "agent.name")
	private String agentName;

	/** 收件人 */
	@Transfer(mapping = "receiver.id")
	private Integer receiverId;
	
	/** 收货人 */
	@Transfer(mapping = "receiver.receiver")
	private String receiver;

	/** 省 */
	@Transfer(mapping = "receiver.province")
	private String province;

	/** 市 */
	@Transfer(mapping = "receiver.city")
	private String city;

	/** 区县 */
	@Transfer(mapping = "receiver.region")
	private String region;

	/** 收货地址 */
	@Transfer(mapping = "receiver.address")
	private String address;

	/** 收货人电话 */
	@Transfer(mapping = "receiver.phone")
	private String phone;
	
	/** 物流 */
	@Transfer(mapping = "logistics.id")
	private Integer logisticsId;

	/** 发货物流公司名称 */
	@Transfer(mapping = "logistics.express")
	private String express;

	/** 发货运单号 */
	@Transfer(mapping = "logistics.waybillNo")
	private String waybillNo;

	/** 发货时间 */
	@Transfer(mapping = "logistics.deliverTime")
	private String deliverTime;

	/** 收货时间 */
	@Transfer(mapping = "logistics.receiveTime")
	private String receiveTime;
	
	@JsonIgnore
	private List<DisOrderGoodsVo> goodses;
}
